package com.lovo.gui.Ddz;



import javax.swing.ImageIcon;
import javax.swing.JLabel;

public class BCards extends JLabel {
    private String name;

    public BCards(String name) {
        this.name = name;
        setSize(71, 96);
        // 设置牌面默认为背面
        setIcon(new ImageIcon("images/rear.jpg"));
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void overturn() {
        setIcon(new ImageIcon("images/" + name + ".jpg"));
    }

}
